import { axios } from '@/utils/request'

/**
 * api接口列表
 */
const api = {
  // 团长 列表
  distList: '/distributor.DistributorIndex/distList',
  // 团长 上下线
  distStatus: '/distributor.DistributorIndex/distStatus',
  // 佣金 列表
  profitList: '/distributor.DistributorIndex/profitList',
  // 下级 列表
  subordinateList: '/distributor.DistributorIndex/subordinateList',
  // 分享 列表
  shareLogList: '/distributor.DistributorIndex/shareLogList',
  // 提现 申请
  withdrawal: '/distributor.DistributorIndex/withdrawalList',
  // 审核 提现
  examine: '/distributor.DistributorIndex/examine'
}

/**
 * 团长 列表
 */
export function distList (params) {
  return axios({
    url: api.distList,
    method: 'get',
    params
  })
}

/**
 * 佣金 列表
 */
export function profitList (params) {
  return axios({
    url: api.profitList,
    method: 'get',
    params
  })
}

/**
 * 下级 列表
 */
export function subordinateList (params) {
  return axios({
    url: api.subordinateList,
    method: 'get',
    params
  })
}

/**
 * 分享 列表
 */
export function shareLogList (params) {
  return axios({
    url: api.shareLogList,
    method: 'get',
    params
  })
}

/**
 * 团长上下线
 */
export function distStatus (data) {
  return axios({
    url: api.distStatus,
    method: 'post',
    data
  })
}

/**
 * 要邀请记录
 */
export function withdrawal (params) {
  return axios({
    url: api.withdrawal,
    method: 'get',
    params
  })
}

/**
 * 审核 提现
 */
export function examine (data) {
  return axios({
    url: api.examine,
    method: 'post',
    data
  })
}
